<div id="sidebar">      
  <div id="search">
    <?php 
      echo $this->Form->create(null, array('url' => array('admin' => false, 'controller' => 'projects', 'action' => 'search'), 'class' => 'search_box'));
    
      echo $this->Form->input('Hľadať', array('div' => false, 'label' => false, 'type' => 'text', 'name' => 'search', 'alt' => 'Hľadaj', 'id' => 'search_box', 'value' => $this->Session->check('Search.search') ? $this->Session->read('Search.search') : 'Hľadaj', 'onfocus' => 'get_focus(this)', 'onblur' => 'lose_focus(this)'));
      
      echo $this->Form->button('Hľadaj', array('div' => false, 'type' => 'submit', 'class' => 'bold rounded bordered gradient'));
      
      echo '<strong>Ktritéria:</strong>';
      if($this->Session->read('Search.projectName') == false AND $this->Session->read('Search.annotation') == false AND $this->Session->read('Search.leaderName') == false)
        //$this->Session->write('Search.projectName', true); // TODO: preco tu nefunguje write, ked normalne ide?
        echo $this->Form->input('projectName', array('div' => false, 'id' => 'search_option1', 'label' => 'Názov Projektu', 'type' => 'checkbox', 'name' => 'projectName', 'checked' => true, 'onclick' => 'alast_one();'));
      else
        echo $this->Form->input('projectName', array('div' => false, 'id' => 'search_option1', 'label' => 'Názov Projektu', 'type' => 'checkbox', 'name' => 'projectName', 'checked' => $this->Session->read('Search.projectName'), 'onclick' => 'alast_one();'));
        
      echo $this->Form->input('annotation', array('div' => false, 'id' => 'search_option2', 'label' => 'Anotácia', 'type' => 'checkbox', 'name' => 'annotation', 'checked' => $this->Session->read('Search.annotation'), 'onclick' => 'alast_one();'));
      echo $this->Form->input('leaderName', array('div' => false, 'id' => 'search_option3', 'label' =>  'Meno vedúceho','type' => 'checkbox', 'name' => 'leaderName', 'checked' => $this->Session->read('Search.leaderName'), 'onclick' => 'alast_one();'));
      //echo '<strong>Extra:</strong>';
      /*if ($this->Session->check('Auth.User'))
        echo $this->Form->input('is_deleted', array('div' => false, 'label' => 'Je zmazaný', 'type' => 'checkbox', 'name' => 'is_deleted', 'checked' => $this->Session->read('Search.is_deleted')));
      echo $this->Form->input('started', array('div' => false, 'label' => 'Začaté', 'type' => 'checkbox', 'name' => 'started', 'checked' => $this->Session->read('Search.started')));
      echo $this->Form->input('ended', array('div' => false, 'label' => 'Skončené', 'type' => 'checkbox', 'name' => 'ended', 'checked' => $this->Session->read('Search.ended')));      
        */
      
      echo $this->Form->end();
    ?>
  </div>
</div>